﻿using System;
using System.Collections.Generic;
using System.Text;

namespace VietKinsNutrition.Common
{
    public class AddTab
    {
        public void Add(DevExpress.XtraTab.XtraTabControl control, string textHeader, DevExpress.XtraEditors.XtraUserControl userControl)
        {
            DevExpress.XtraTab.XtraTabPage tabPage = new DevExpress.XtraTab.XtraTabPage();
            tabPage.Text = textHeader;
            tabPage.Controls.Add(userControl);
            userControl.Dock = System.Windows.Forms.DockStyle.Fill;
            control.TabPages.Add(tabPage);
            control.TabPages.TabControl.SelectedTabPage = tabPage;
        }
    }
}
